package com.li.jiang.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.li.jiang.obj.pojo.Photos;
import com.li.jiang.mapper.PhotosMapper;
import com.li.jiang.service.IPhotosService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 李江
 * @since 2024-04-12
 */
@Service
public class PhotosServiceImpl extends ServiceImpl<PhotosMapper, Photos> implements IPhotosService {

    public Photos getPhotoByName(String name){
        LambdaQueryWrapper<Photos> wrapper = new LambdaQueryWrapper<Photos>().eq(Photos::getName,name);
        return getOne(wrapper);

    }

}
